/**
 * Project:   dtu.fmes.googleloon
 * File:      GpsModule.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright:	Bartosz Cichecki [ cichecki.bartosz@gmail.com ]
 * 				Nicolai Sonne [ NicolaiSonne@hotmail.com.com ]
 * Date:      Dec 11, 2013
 */

package dtu.fmes.loon.model.balloon;

/**
 * 
 * @author Bartosz Cichecki, Nicolai Sonne
 */
public class GpsModule {

	private Double powerUsage;

	private Double weight;

	public GpsModule() {

	}

	public GpsModule(Double powerUsage, Double weight) {
		super();
		this.powerUsage = powerUsage;
		this.weight = weight;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		GpsModule other = (GpsModule) obj;
		if (powerUsage == null) {
			if (other.powerUsage != null) {
				return false;
			}
		} else if (!powerUsage.equals(other.powerUsage)) {
			return false;
		}
		if (weight == null) {
			if (other.weight != null) {
				return false;
			}
		} else if (!weight.equals(other.weight)) {
			return false;
		}
		return true;
	}

	public Double getPowerUsage() {
		return powerUsage;
	}

	public Double getWeight() {
		return weight;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (powerUsage == null ? 0 : powerUsage.hashCode());
		result = prime * result + (weight == null ? 0 : weight.hashCode());
		return result;
	}

	public void setPowerUsage(Double powerUsage) {
		this.powerUsage = powerUsage;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	@Override
	public String toString() {
		return "GpsModule [powerUsage=" + powerUsage + ", weight=" + weight + "]";
	}

}
